<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('参与者信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>序号：</label>
                                <input type="text" name="serialNumber"/>
                            </li>
                            <li>
                                <label>姓名：</label>
                                <input type="text" name="participantName"/>
                            </li>
                            <li class="select-time">
                                <label>出生日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginParticipantBirthdate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endParticipantBirthdate]"/>
                            </li>
                            <li>
                                <label>专业职务：</label>
                                <select name="professionalDuties" th:with="type=${@dict.getType('sys_duties')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>研究专长：</label>
                                <select name="theFeat" th:with="type=${@dict.getType('sys_research')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>最后学历：</label>
                                <select name="lastEducation" th:with="type=${@dict.getType('sys_education')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>最后学位：</label>
                                <select name="lastDegree" th:with="type=${@dict.getType('sys_degree')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>工作单位：</label>
                                <input type="text" name="workUnit"/>
                            </li>
                            <li>
                                <label>附件id：</label>
                                <input type="text" name="accessoryId"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('ruoyi:information:edit')}]];
        var removeFlag = [[${@permission.hasPermi('ruoyi:information:remove')}]];
        var professionalDutiesDatas = [[${@dict.getType('sys_duties')}]];
        var theFeatDatas = [[${@dict.getType('sys_research')}]];
        var lastEducationDatas = [[${@dict.getType('sys_education')}]];
        var lastDegreeDatas = [[${@dict.getType('sys_degree')}]];
        var prefix = ctx + "ruoyi/information";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "参与者信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'serialNumber',
                    title: '序号'
                },
                {
                    field: 'participantName',
                    title: '姓名'
                },
                {
                    field: 'participantBirthdate',
                    title: '出生日期'
                },
                {
                    field: 'professionalDuties',
                    title: '专业职务',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(professionalDutiesDatas, value);
                    }
                },
                {
                    field: 'theFeat',
                    title: '研究专长',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(theFeatDatas, value);
                    }
                },
                {
                    field: 'lastEducation',
                    title: '最后学历',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(lastEducationDatas, value);
                    }
                },
                {
                    field: 'lastDegree',
                    title: '最后学位',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(lastDegreeDatas, value);
                    }
                },
                {
                    field: 'workUnit',
                    title: '工作单位'
                },
                {
                    field: 'accessoryId',
                    title: '附件id'
                },
               ]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>